package com.geeksaga.dao.ibatis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Component;

import com.ibatis.sqlmap.client.SqlMapClient;

/**
 * @author newbie
 * @since 0.1
 */
@Component
public abstract class BaseIBatisDao extends SqlMapClientDaoSupport {
	@Autowired
	private MessageSourceAccessor messageSourceAccessor;

    public MessageSourceAccessor getMessageSourceAccessor() {
		return messageSourceAccessor;
	}
    
    @Autowired
    public void initSqlMapClient(@Qualifier("sqlMapClient")SqlMapClient sqlMapClientTemplate) {
    	super.setSqlMapClient(sqlMapClientTemplate);
    }
}